package structural.adapter;

import structural.adapter.avaFilters.Caramel;

// 方法一：使用组合，适配器内部持有被适配对象
public class CaramelFilter implements IFilter {
    private final Caramel caramel;

    public CaramelFilter(Caramel caramel) {
        this.caramel = caramel;
    }

    @Override
    public void apply(Image image) {
        caramel.init();
        caramel.render(image);
    }
}
